/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Includes ------------------------------------------------------------------*/

/* Private includes ----------------------------------------------------------*/

#ifndef __BOOT_H__
#define __BOOT_H__

#define EASYLINK_0 (0xFE)
#define EASYLINK_1 (0x55)
#define EASYLINK_2 (0xAA)
#define EASYLINK_3 (0xFD)

void com_char(unsigned char c);
void comdat_decode(unsigned char * dat,unsigned int len);
void usart1_send(unsigned char * dat,unsigned int len);;
void decode_com_data(unsigned char ID,unsigned char * recb,unsigned short len);
void boot_loader_thread(void);
unsigned int app_code_check(void);
void JumpToapp(void);
void boot_mode(unsigned int fe);

#endif


